{literal}
<script type="text/javascript">
	

	// O2k7 skin (silver)
	tinyMCE.init({
		// General options
		mode : "exact",
		elements : "elm3",
		theme : "advanced",
		skin : "o2k7",
		skin_variant : "silver",
		plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",

		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example content CSS (should be your site CSS)
		content_css : "css/content.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});


</script>
<!-- /TinyMCE -->
{/literal}

<div  class="clear"> </div>
    <div id="element-box" >
    <h2>Добавить новость</h2>				
    <div  class="panel" style="height: 550px;">
        <form name="news" method="post" action="{$form_action}">
        	<h4>Заголовок</h4>
            
            <input  name="title" {if isset($title)} value="{$title}" readonly="true" style="color: gray;" {/if} />
            
            <div style="width: 78%; float: left;">
                <h4>Основной текст</h4>
                <!-- /TinyMCE -->
                <textarea id="elm3" name="text"  style="width: 100%; height: 400px;">
        		  {if isset($text)} {$text} {/if}
        	    </textarea>
               <!-- /TinyMCE -->
               <br />
               {if isset($title)}
                   <div class="button2">
                    	<a onclick="news.submit();">Изменить новость</a>
                   </div>
                   <span style="padding: 10pxa; float:right;">&nbsp;&nbsp;&nbsp;</span >
                   <div class="button3">
                        <a href="{$delete_link}">Удалить новость</a>
                   </div>
                   
                   <div class="cansel">
                        <a href="{$form_action}">Отмена</a>
                   </div>
               {else}
                   <div class="button2">
                        <a onclick="news.submit();">Добавить новость</a>
                   </div>
               {/if}
               <br />
            </div>
            <div style="float:right; width: 20%">
                <h4>Новости на сайте</h4>
            </div>
            <div id="old_news">
                <ul class="newslist">
                    {foreach from=$news item=cur}
                        <li> <a href="{$cur.href}">{$cur.title}</a> </li>
                    {/foreach}
                </ul>
            </div>
        </form>
    </div>
</div>